package com.api;

import com.api.Exception.MessageRunTimeException;

import java.util.List;

/**
 * 发送消息接口
 * Created with IDEA
 * Author: LuoHengYi
 * Date: 2022/6/18
 * Time: 10:26
 */
public interface MessageProducer {

    /**
     * 发送消息 附带 SendCallback 回调
     * @param message
     * @param sendCallback
     * @throws MessageRunTimeException
     */
    void send(Message message,SendCallback sendCallback) throws MessageRunTimeException;


    /**
     * 发送消息
     * @param message
     * @throws MessageRunTimeException
     */
    void send(Message message) throws MessageRunTimeException;



    /**
     * 批量发送消息 附带 SendCallback 回调
     * @param messages
     * @param sendCallback
     * @throws MessageRunTimeException
     */
    void send(List<Message> messages,SendCallback sendCallback) throws MessageRunTimeException;

}
